<template>
  <div class="container">
    暗访结果录入
    <div class="form">
      <div class="formtitle">暗访企业信息</div>
      <div class="box">
        <div>企业名称:</div>
        <el-input style="width: 200px;margin: 0 12px;" v-model="form.enterpriseName" placeholder="申请单位" clearable />
        <div class="flex">
          <div style="margin-left: 24px;">企业地址:</div>
          <div>上海市徐汇区徐汇街道2312号</div>
        </div>
      </div>
      <div class="formtitle">街镇基本信息</div>
      <div class="box">
        <div>街道名称:</div>
        <el-select v-model="form.value" placeholder="请选择" style="width: 200px;margin: 0 12px;">
          <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"
            :disabled="item.disabled" />
        </el-select>
        <div style="margin-left: 24px;">所属区域:</div>
        <el-select v-model="form.value" placeholder="请选择" style="width: 200px;margin: 0 12px;">
          <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"
            :disabled="item.disabled" />
        </el-select>
      </div>
      <div class="formtitle">暗访基本信息</div>
      <div class="box">
        <div>暗访时间:</div>
        <el-date-picker style="width: 200px;margin: 0 12px;" v-model="form.secretVisitTime" type="datetime" placeholder="请选择" />
        <div style="margin-left: 24px;">暗访人:</div>
        <el-input style="width: 200px;margin: 0 12px;" v-model="form.secretVisitPerson" placeholder="申请单位" clearable />
      </div>
      <div class="formtitle">暗访结果信息</div>
      <div class="box">
        <div style="width: 5rem;">问题分类:</div>
        <el-checkbox-group v-model="form.checkList" style="margin-left: 12px 0;">
          <el-checkbox label="计量管理问题" value="Value A" />
          <el-checkbox label="计量器具配备问题" value="Value B" />
          <el-checkbox label="计量器具管理问题" value="Value C" />
          <el-checkbox label="商品量问题" value="Value C" />
          <el-checkbox label="法定计量单位问题" value="Value C" />
          <el-checkbox label="诚信体系问题" value="Value C" />
          <el-checkbox label="其它问题" value="Value C" />
        </el-checkbox-group>
      </div>
      <div class="box">
        <div style="width: 5rem;">问题具体描述:</div>
        <el-input v-model="form.textarea" maxlength="300" style="width: 70%; margin: 12px 0" placeholder="请输入"
          show-word-limit rows="4" type="textarea" />
        <el-upload v-model:file-list="fileList" class="upload-demo"
          action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" multiple :on-preview="handlePreview"
          :on-remove="handleRemove" :before-remove="beforeRemove" :limit="3" :on-exceed="handleExceed">
        </el-upload>
      </div>
      <div class="box">
        <div style="width: 5rem;">整改建议:</div>
        <el-input v-model="form.advise" maxlength="300" style="width: 70%; margin: 12px 0" placeholder="请输入"
          show-word-limit rows="4" type="textarea" />
        <el-upload v-model:file-list="fileList" class="upload-demo"
          action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" multiple :on-preview="handlePreview"
          :on-remove="handleRemove" :before-remove="beforeRemove" :limit="3" :on-exceed="handleExceed">
        </el-upload>
      </div>
      <div class="box">
        <div style="width: 5rem;">现场照片证据:</div>
        <el-upload v-model:file-list="form.fileList" class="upload-demo" style="width: 70%; margin: 12px 0"
          action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" multiple :on-preview="handlePreview"
          :on-remove="handleRemove" :before-remove="beforeRemove" :limit="3" :on-exceed="handleExceed">
          <el-button type="primary" size="small">上传附件</el-button>
        </el-upload>
      </div>
    </div>
    <div class="button">
      <el-button @click="dialogVisible = false">取消</el-button>
      <el-button type="primary" @click="submit">
        提交
      </el-button>
    </div>
  </div>
</template>
<script name="list-two" setup>
import { addAnfang } from '@/api/rzsq'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useRoute, useRouter } from "vue-router";
const router = useRouter();
const route = useRoute();
let applicationId =route.query.id
let form = reactive({})
const submit = () => {
  form.applicationId =applicationId
  debugger
  addAnfang(form).then(res => {
    if (res.code == "0") {
      ElMessage({
        message: '新增成功',
        type: 'success',
      })
    }
  })
}
</script>
<style lang="scss" scoped>
.container {
  background-color: white;

  .form {
    margin-top: 24px;
  }
}

.formtitle {
  color: #4688f6;
  padding-bottom: 2px;
  border-bottom: 1px solid #4688f6;
}

.box {
  display: flex;
  align-items: center;
  font-size: 12px;
  margin: 24px;
}

.flex {
  display: flex;
}

.button {
  display: flex;
  justify-content: center;
}

::v-deep .fc-form-item {
  margin-top: 12px !important;
}
</style>
